package com.code.AZPlan.model.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * AZ计划钱包已经同步的充值记录PO及持久层对象
 *
 * @author tangyifei
 * @since 2020年1月2日13:45:21
 */
@ApiModel("AZ计划钱包已经同步的充值记录PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class RechargeTran implements Serializable {

    private static final long serialVersionUID = 509231542634511442L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "用户账号", example = "XXXXXX")
    private String userAccount;

    @ApiModelProperty(value = "币种类型", example = "1")
    @NotBlank(message = "币种类型不能为空")
    private String coinType;

    @ApiModelProperty(value = "币种地址", example = "1")
    @NotBlank(message = "币种地址不能为空")
    private String coinAddress;

    @ApiModelProperty(value = "金额", example = "1")
    @NotNull(message = "金额不能为空")
    private BigDecimal coinAmount;

    @ApiModelProperty(value = "交易时间", example = "1")
    @NotNull(message = "交易时间不能为空")
    private Date txTime;

    @ApiModelProperty(value = "交易ID", example = "1")
    @NotBlank(message = "交易ID不能为空")
    private String txId;

    @ApiModelProperty(value = "确认数", example = "1")
    private Integer confirmations;

    @ApiModelProperty(value = "备注", example = "1")
    private String remark;

    @ApiModelProperty(value = "创建时间", example = "1")
    @NotNull(message = "创建时间不能为空")
    private Date createTime;

    @ApiModelProperty(value = "充值类型 1内部转入 2区块链转入 3站内转入 4内部转出", example = "1")
    private Integer rechargeType;
}
